package com.ujiuye.demo;

import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import java.io.File;
import java.io.IOException;

/**
 * @author: zwp
 * @version: 1.0
 * @create 2021-07-08 15:30
 */
public class POIDemo {
    public static void main(String[] args) throws IOException {
        HSSFWorkbook workbook = new HSSFWorkbook();
        HSSFSheet sheet = workbook.createSheet("套餐信息");
        HSSFRow row = sheet.createRow(0);
        row.createCell(0).setCellValue("jack");
        row.createCell(1).setCellValue("jack");
        row.createCell(2).setCellValue("jack");
        row.createCell(3).setCellValue("jack");
        File file = new File("F:\\upload\\info.xls");
        workbook.write(file);
        System.out.println("创建成功");
    }
}
